<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>Document</title>
	<script type="text/javascript" src="jquery-3.3.1.js"></script>
    <style type="text/css">
        div
        {
        	width: 500px;height: 50px;line-height: 50px;text-align: center;
        	margin:0 auto;background-color: pink;display: none;
        }
    </style>
</head>
<body>
	
	<div>这是一个提示消息</div>
</body>
</html>
<script type="text/javascript">
	$(function(){
		//delay:延迟
		//让div先显示，中间停顿2秒（延迟时间），再隐藏div
		$('div').fadeIn(1000).delay(2000).fadeOut(1000);
	});

</script>